package summer_vacation.qiuyangyang;
import java.util.Scanner;
/**
 * Created by Administrator on 2015/8/26 0026.
 */
public class Assignment_20 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入a b c：");
        double a,b,c;
        a=sc.nextDouble();
        b=sc.nextDouble();
        c=sc.nextDouble();
        double d=b*b-4*a*c;
        if ( d == 0 ){
            System.out.println("x="+(-b)/(2*a) );
        }
        else if ( d< 0){
            System.out.println("无解");
        }
        else{
            System.out.println("x1="+(-b+Math.sqrt(d))/(2*a) );
            System.out.println("x2="+(-b-Math.sqrt(d))/(2*a) );
        }
    }
}
